<!--[if IE]>
<script type="text/javascript" src="${rc.getContextPath()}/pie/PIE.js"></script>
<![endif]-->
<script type="text/javascript">
var graphMsg = {
    all : '<@label key="all.C">所有</@label>',
    processAttachmentGraph : '<@label key="processAttachmentGraph.C">工艺流程图</@label>',
    noProcessAttachmentGraph : '<@label key="noProcessAttachmentGraph.C">该工艺流程图不存在，请检查数据!</@label>',
    defectInfo : '<@label key="defectInfo.C">缺陷信息</@label>',
    inspectRecorder : '<@label key="defectRecorder.C,colon">检验人：</@label>',
    inspectDateTime : '<@label key="inspectDateTime.C,colon">检验时间：</@label>',
    defectText : '<@label key="defectText.C,colon">缺陷描述：</@label>',
    endDateLessThanStart : '<@label key="endDateLessThanStart.M">您提交的数据有误，结束日期小于起始日期！</@label>',
    picture_th : '<@label key="picture.C">图片</@label>'
}
</script>
<script type="text/javascript" src="${rc.getContextPath()}/manage/js/businessJs/defectGraph.js"></script>
<style type="text/css">
.pageContent > div.main_panel {
    float: left; 
    display: block; 
    min-height: 550px; 
    min-width: 900px; 
    width: 100%; 
    height: 100%; 
    position: relative;
    overflow: hidden;
}

#defectGraphSearchTab .tabsContent {
    padding: 0px;
}

.main_panel > .graph_panel {
    float: left; 
    display: block; 
    width: 702px; 
    line-height: 21px; 
    background: rgb(255, 255, 255); 
    min-height: 550px; 
    margin: 5px;
    height: 100%;
    position: relative;
}

.graph_panel > div {
    position: absolute;
    border: 1px solid #D8DFE5; 
    border-collapse: collapse; 
    overflow-y: auto;
    border-spacing: 0px;
    width: 100%;
}

.HotMap > * {
    display: block; 
    position: absolute; 
    height:450px; 
    width:700px; 
    top: 0; 
    bottom: 0; 
    left: 0;
    right: 0;
    margin: auto;
    overflow: hidden;
}

.defectGraph {
    width: auto;
}

.defectTypeIcon {
    display: block;
    height: 20px;
    line-height: 18px;
    width: 115px;
    text-align: left;
    padding-left: 20px;
    position: relative;
    float: left;
}

#productionControlsGrid td > .hasDefect {
    background: #F5F5B4;
    background-color: #F5F5B4;
}

.defectTypeIcon > a {
    top: 5px;
    left: 5px;
}

.defectTypeIcon.filtered > a {
    top: 2px;
    left: 2px;
    width: 15px;
    height: 15px;
}

.defectGraph label, .defectGraph select {
    width: 70px;
    margin: 0px;
    margin-left: 7px;
}

.defectGraph select {
    width: 90px;
}

.defectGraphSearch li {
    height: 30px;
}

.buttonActive {
    cursor: pointer;
}

.circle {
    border-radius: 50%;
    height: 10px;
    width: 10px;
    position: absolute;
    cursor: pointer;
    z-index: 10;
    display: block;
}

.defectPoint {
    margin-left: -5px;
    margin-top: -5px; 
}

.defectPoint.hovered {
    height: 15px;
    width: 15px;
    margin-left: -7.5px;
    margin-top: -7.5px; 
    z-index: 11;
}

.defectPanel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.defectGraphSearch li > div {
    float: left;
    position: relative;
}

.defectGraphSearch li > div > span.error {
    position: absolute;
    left: 250px;
    top: 1px;
}

.grid_panel {
    border: 1px solid #D8DFE5; 
    position: absolute; 
    left: 715px; 
    right: 5px;
    min-width: 280px;
    overflow: hidden;
}

.defectInfo {
    position: absolute;
    width: 195px;
    height: auto;
    border: 1px solid #D8DFE5; 
    z-index: 12;
    background: #EFF2F7;
    text-align: left;
    line-height: 25px;
    padding-left: 5px;
}

.arrow {
    background: url("${rc.getContextPath()}/images/dialogarrow.png");
    position: absolute; 
}

.arrow-left {
    left: -8px;
    top: -1px;
    width: 8px;
    height: 16px;
    background-position: 0px 0px;
}
   
.arrow-right {
    right: -8px;
    top: -1px;
    width: 8px;
    height: 16px;
    background-position: 0px -21px;
}

#productionDetailsTable .gridScroller {
    height: 193px !important;
}
</style>
<div class="pageContent" style="height: 100%;">
    <script type="text/javascript">
        $('.pageContent').parent().css('height', '100%');
    </script>
    <div class="main_panel">
        <div id="graph_panel" class="graph_panel">
            <#include "/qm/defectGraph/defectGraph.html">
        </div>
        <div id="defectGraphSearchTab" class="tabs grid_panel" currentIndex="0" eventType="click" style="top: 5px; border: 0px;">
            <div class="tabsHeader">
                <div class="tabsHeaderContent">
                    <ul>
                        <li><a href="javascript:;"><span><@label key="query.B">查询</@label></span></a></li>
                        <li><a href="javascript:;"><span><@label key="productionControlNum.C">生产管理号</@label></span></a></li>
                    </ul>
                </div>
            </div>
            <div class="tabsContent" style="height: 246px;">
                <#include "/qm/defectGraph/tabsContent.html">
            </div>
            <div class="tabsFooter" style="height: 0px !important;">
                <div class="tabsFooterContent"></div>
            </div>
        </div>
        <div id="productionControlsGrid" class="layoutPanel grid_panel" style="top: 287px; bottom: 12px;"></div>
    </div>
    <script type="text/javascript">
    $('#productionControlsGrid', DWZ.context()).jGrid({
        url: hostUrl + "/defectGraph/selectProcessOperations",
        autoLoad: false,
        layoutH: 30,
        columns: [
            {field: 'operationText', text: '<@label key="qmOperation.C">质检工序</@label>', width: 150},
            {field: 'fileName', text: '<@label key="picture.C">图片</@label>', thrender: function(th){
                var $label = $('<label/>').css({'margin-left': '30px'}),
                $checkBox = $('<input type="checkbox"/>').appendTo($label);
                $label.append('<@label key="onlyHasDefect.C">仅含缺陷</@label>').appendTo(th);
                $checkBox.on('change', function(){
                    hasDefectFilter(this);
                });
            }, tdrender: function(td, tdData){
                if (tdData.defectCount &&  tdData.defectCount > 0) {
                    td.addClass("hasDefect");
                }
            }}
        ],
        queryable: false,
        pageable: false,
        orderable: false
    });
    </script>
</div>